package models

import "time"

type Member struct {
	Id         int64
	Name       string
	Phone      string
	OpenId     string
	Cover      string
	LsUser     string
	LsCard     string
	Role       int64
	BusinessId int64
	UpdateAt   time.Time `xorm:"not null updated"`
	DeleteAt   time.Time `xorm:"deleted"`
	CreateAt   time.Time `xorm:"not null created"`
}

type MemberInfo struct {
	Member     `xorm:"extends"`
	LsUserInfo `xorm:"extends"`
	LsCardInfo `xorm:"extends"`
}

func (m MemberInfo)TableName() string {
	return "member"
}


type BusinessMember struct {
	Id             int64
	MemberId       int64
	MemberName     string
	MemberPhone    string
	BusinessId     int64
	BusinessName   string
	InviteId       int64
	IsIndependence int64
	UpdateAt       time.Time `xorm:"not null updated"`
	DeleteAt       time.Time `xorm:"deleted"`
	CreateAt       time.Time `xorm:"not null created"`
}

type LsUserInfo struct {
	Id               int64
	UserId           int64
	ChannelUser      string
	CertType         string
	Name             string
	CertNo           string
	CertValidityType string
	CertBeginDate    string
	CertEndDate      string
	MobileNo         string
	Email            string
	UpdateAt         time.Time `xorm:"not null updated"`
	DeleteAt         time.Time `xorm:"deleted"`
	CreateAt         time.Time `xorm:"not null created"`
}

type LsCardInfo struct {
	Id               int64
	UserId           int64
	CardType         int64
	CardName         string
	CardNo           string
	ProvId           string
	AreaId           string
	BranchCode       string
	BranchName       string
	CertNo           string
	CertValidityType string
	CertBeginDate    string
	CertEndDate      string
	Mp               string
	CardId           string
	UpdateAt         time.Time `xorm:"not null updated"`
	DeleteAt         time.Time `xorm:"deleted"`
	CreateAt         time.Time `xorm:"not null created"`
}
